<?php

namespace App\Observers;

use App\Model\Zan;

class ZanObserver
{
    //
    public function created(Zan $zan){

        $zan->belongsModel()->increment('zan_num');
    }

    public function deleted(Zan $zan){

        $zan->belongsModel()->decrement('zan_num');
    }
}
